import cern.jet.random.Binomial;
import cern.jet.random.ChiSquare;
import cern.jet.random.Exponential;
import cern.jet.random.Gamma;
import cern.jet.random.Normal;
import cern.jet.random.Poisson;
import cern.jet.random.Uniform;
import cern.jet.random.engine.DRand;
import cern.jet.random.engine.RandomEngine;


public class RandomNumber {
	
	private RandomEngine engine = null;
	private Poisson poisson = null;
	private Normal normal = null;
	private ChiSquare chi = null;
	private Uniform uniform = null;
	private Binomial binomial = null;
	private Exponential exponential = null;
	private Gamma gamma = null;
	
	public RandomNumber(double lambda, 
			double mean, 
			double variance, 
			double degreesOfFreedom,
			int n,
			double p,
			double lambdaExp,
			double alpha,
			double lambdaGamma){
		engine = new DRand();
		poisson = new Poisson(lambda, engine);
		normal = new Normal(mean, variance, engine);
		chi = new ChiSquare(degreesOfFreedom, engine);
		uniform = new Uniform(engine);
		binomial = new Binomial(n,p, engine);
		exponential = new Exponential(lambdaExp, engine);
		gamma = new Gamma(alpha, lambdaGamma, engine);
	}
	
	public int nextPoisson(){
		return poisson.nextInt();
	}
	
	public double nextNormal(){
		
		return normal.nextDouble();
	}
	
	public double nextChi(){
		return chi.nextDouble();
	}
	
	public double nextUniform(){
		return uniform.nextDouble();
	}
	
	public int nextBinomial(){
		return binomial.nextInt();
	}
	
	public double nextExponential(){
		return exponential.nextDouble();
	}
	
	public double nextGamma(){
		return gamma.nextDouble();
	}
	
	

}
